CC=gcc
CFLAGS=-Wall -g
LIBPATH=../../../..
INCLS=-I$(LIBPATH)/include
LIBS=-L$(LIBPATH)/lib -lsoar_g -lpthread

BINS=server server_thread local_server
MULTI_BINS=

all : $(BINS) $(MULTI_BINS)

$(BINS) : % : %.c
	$(CC) $(CFLAGS) $(INCLS) -o $@ $< $(LIBS)
	chmod 744 $@

$(MULTI_BINS) : %_multi : %.c
	$(CC) $(CFLAGS) $(INCLS) -D_MY_MULTI -o $@ $< $(LIBS)
	chmod 744 $@

clean :
	rm -f core* $(BINS) $(MULTI_BINS)
